<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class THisdataAquaculture extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_hisdata_Aquaculture', function (Blueprint $table) {
             $table->engine = 'MyISAM';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->increments('hd_index')->nullable(false)->comment('');
			$table->datetime('rd_updatetime')->nullable(false)->comment('');
			$table->datetime('hd_datetime')->nullable(false)->comment('');
			$table->unsignedInteger('pdi_index')->nullable(false)->default(0)->comment('');
			$table->float('hd_DO', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_WTH', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PH', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_IT', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_WL', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_NH4', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_RC', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_Flow', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_AllFlow', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_DOUpLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_WTHUpLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PHUpLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_ITUpLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_WLUpLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_NH4UpLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_RCUpLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_FlowUpLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_AllFlowUpLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_DODownLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_WTHDownLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PHDownLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_ITDownLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_WLDownLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_NH4DownLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_RCDownLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_FlowDownLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_AllFlowDownLimit', 9, 2)->nullable()->default(0)->comment('');
			$table->boolean('hd_DOHhwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_WTHhwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_Phhwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_Ithwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_Wlhwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_NH4hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_Rchwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_Flowhwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_AllFlowhwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_DOlwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_WTHlwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_Phlwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_Itlwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_Wllwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_NH4lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_Rclwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_Flowlwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_AllFlowlwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_NetCom')->nullable()->default(0)->comment('');
			$table->unique('hd_index', 'hd_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_hisdata_Aquaculture');
    }
}
